package de.szut.kundenverwaltung;

import javax.swing.JLabel;
import javax.swing.JSlider;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

public class SliderListener implements ChangeListener{

	private JLabel rabatt_text;
	public SliderListener(JLabel rabatt_text){
		this.rabatt_text = rabatt_text;
	}
	@Override
	public void stateChanged(ChangeEvent e) {
		int slide = ((JSlider) e.getSource()).getValue();
		rabatt_text.setText("Rabatt: "+ slide + " %");
		
	}

}
